#ifndef PROPDATA_H
#define PROPDATA_H

#include <QObject>
#include <vector>
#include "coordinate.h"
#include "tuple.h"

class PropData : public QObject
{
    Q_OBJECT

#define PROP_DEVICE_PATH true
#define PROP_LOCAL_PATH false
#define PROP_IS_DEVICE 0
#define PROP_IS_LOCAL 1
#define PROP_IS_MIXED 2
#define PROP_SAVED true
#define PROP_NOT_SAVED false
private:
    // This is private b/c if the prop name changes on a prop that is already on the device, then the
    // generated path to that prop is now different.
    QString propName;

    void updateAllPaths(QString oldPName, QString newPName);
    QString updatePath(QString old, QString oldPName, QString newPName);

public:
    std::vector<Coordinate> propCoords;

    // <"string", true: on the device; false: local path>
    //Tuple<QString, bool> *audMain;
    QString audMain;
    QString audMainDevice;
    Tuple<QString, bool> *audMainScript;
    //Tuple<QString, bool> *audMainScriptFile;
    QString audMainScriptFile;
    QString audMainScriptFileDevice;
    //std::vector<Tuple<QString, bool>* > aud;
    std::vector<Tuple<QString, QString>* > aud;
    //std::vector<Tuple<QString, bool>* > vid;
    std::vector<Tuple<QString, QString>* > vid;
    //std::vector<Tuple<QString, bool>* > pic;
    std::vector<Tuple<QString, QString>* > pic;

    // True if paths are local to this machine. This means that paths must be translated to
    // something that makes sense to the android device before xml is written.
    bool localPaths; // TODO: replace this entirely with propLoc
    int propLoc;
    bool propStatus;

    explicit PropData(QObject *parent = 0);
    explicit PropData(QString pName, std::vector<Coordinate> pCoords, QString aMain, QString aMScript, QString aMScriptF, std::vector<QString> a, std::vector<QString> v, std::vector<QString> p, bool fromDevice = true);
    explicit PropData(PropData *other, QObject *parent = 0);
    ~PropData();

    QString getPropName();
    void changePropName(QString pName);

    //Tuple<QString, bool>* const& getAudMain() const;
    void setAudMain(QString aMain);

    //Tuple<QString, bool>* const& getAudMainScript() const;
    void setAudMainScript(QString script, bool fromXML = false);
    //Tuple<QString, bool>* const& getAudMainScriptFile() const;
    void setAudMainScriptFile(QString scrFile);

    void addAud(std::vector<QString> a);
    void addVid(std::vector<QString> v);
    void addPic(std::vector<QString> p);
    //std::vector<Tuple<QString, bool>* > const& getAud() const;
    //std::vector<Tuple<QString, bool>* > const& getVid() const;
    //std::vector<Tuple<QString, bool>* > const& getPic() const;

signals:

public slots:

};

#endif // PROPDATA_H
